import request from '@/utils/request'

// 用户数据
export const getPersonData = () => {
  return request({
    url: '/archives/notice/getPersonData',
    method: 'post'
  })
}

// 按起火单位属性统计
export const getTotalByOrg = () => {
  return request({
    url: '/archives/archives/totalByOrg',
    method: 'get'
  })
}

// 按起火原因统计
export const getTotalByReason = () => {
  return request({
    url: '/archives/archives/totalByReason',
    method: 'get'
  })
}
// 按火灾规模统计
export const getTotalByScale = () => {
  return request({
    url: '/archives/archives/totalByScale',
    method: 'get'
  })
}
// 按月份统计
export const getTotalByYear = (params) => {
  return request({
    url: '/archives/archives/totalByYear',
    method: 'get',
    params
  })
}

// 按程序类型统计
export const getTotalByType = () => {
  return request({
    url: '/archives/archives/totalByType',
    method: 'get'
  })
}

// 按报警信息统计
export const getWarnList = (beginTime, endTime, count) => {
  const params = {
    beginTime,
    endTime,
    count
  }
  return request({
    url: '/warning/getWaringList',
    method: 'get',
    headers: {
      isToken: false
    },
    params
  })
}

